<?php include('header.php');


if(!empty($_GET[deleteid])) {
	$sql = "DELETE FROM `users` WHERE `User_id` = '$_GET[deleteid]' ";
	$db->query($sql);
	$db->Get_admin_msg("user_list.php","删除成功！");
}
?><style type="text/css">
<!--
body {
	background-color: #E1E1E1;
}
body,td,th {
	color: #000000;
	font-family: Trebuchet MS;
}
-->
</style><div id="wapper" style="width:980px;margin:0 auto"> 
    <!--form action="" method="post" onSubmit="return check()"-->
    <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
        <tr>
            <td class="CPanel"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="40" class="font42"><table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#8096FF"  class="newfont03">
                                <tr class="CTitle" >
                                    <td height="22" colspan="10" align="center" bgcolor="#8096FF" style="font-size:16px; color:#000000">user list</td>
                                </tr>
                                <tr bgcolor="#DFECE0">
                                    <td width="4%" align="center" height="30" style="color:#000000">id</td>
                                    <td width="10%" align="center" style="color:#000000">name</td>
                                     <td width="10%" align="center" style="color:#000000">fullname</td>
								<td width="10%" align="center" style="color:#000000">email</td>
                                    <td width="10%" align="center" style="color:#000000">option</td>
                                </tr>
                                <?php
            //查询出所有数据
          	 $result = mysql_query("select User_id  from users");
          	 //计算出总的数据 num
    		 $total = mysql_num_rows($result);
    		 //设置分页
    		 pageft($total, 10);
    		 //
    		 if ($firstcount < 0) $firstcount = 0;
   				$query = $db->findall("users order by User_id desc limit  $firstcount, $displaypg");
				
   			while ($row = $db->fetch_array($query)) {
          	?>
                                <tr>
                                    <td align="center"><?php echo $row[User_id]; ?></td>
                                    <td align="center"><?php echo $row[User_name]; ?></td>
                                     <td align="center"><?php echo $row[User_fullname]; ?></td>
                                      <td align="center"><?php echo $row[User_email ]; ?></td>
                                    <td align="center"><a href="product_list.php?deleteid=<?php echo $row[Product_id] ?>" style="color:#CC3300">delete</a></td>
                                </tr>
                                <?php } ?>
                            </table></td>
                    </tr>
                </table>
                <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="33"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="right-font08">
                                <tr>
                                    <td width="1%"><?php echo $pagenav;?></td>
                                </tr>
                            </table></td>
                    </tr>
                </table></td>
        </tr>
        <tr>
            <td class="CPanel"></td>
        </tr>
    </TABLE>
</div>
</form>
<?php include('footer.php')?>